//package great.project.jpa.signle.table;
//
//import com.querydsl.core.BooleanBuilder;
//import com.querydsl.core.types.Predicate;
//import great.project.jpa.sign.table.SpringDataJpaSearchSingelTableDemo;
//import great.project.jpa.sign.table.domain.entity.QSysUser;
//import great.project.jpa.sign.table.domain.entity.SysUser;
//import great.project.jpa.sign.table.domain.respository.SysUserRepository;
//import org.hamcrest.MatcherAssert;
//import org.hamcrest.core.Is;
//import org.junit.jupiter.api.Test;
//import org.springframework.boot.test.context.SpringBootTest;
//
//import javax.annotation.Resource;
//
///**
// *  <div  style="border:2px solid none;margin:20px;padding:15px;font-size:24px;text-align:center;color:aqua;">
// *
// *
// *
// *  </div>
// * @author v_zhangshun01
// * @date 2021/8/20 5:30 下午
// */
//@SpringBootTest(classes = SpringDataJpaSearchSingelTableDemo.class)
//public class QueryDSL {
//
//
//    @Resource
//    private SysUserRepository sysUserRepository;
//
//    QSysUser qSysUser = QSysUser.sysUser;
//
//    @Test
//    void t00() {
//        final BooleanBuilder builder = new BooleanBuilder();
//
//        builder.and(qSysUser.username.eq("admin"));
//        builder.and(qSysUser.status.eq(true));
//
//        final Iterable<SysUser> all = sysUserRepository.findAll(builder);
//        for (SysUser sysUser : all) {
//            MatcherAssert.assertThat(sysUser.getUsername() , Is.is("admin"));
//        }
//    }
//
//    @Test
//    void t01() {
//        final Predicate admin = qSysUser.username.eq("admin");
//        final Iterable<SysUser> all = sysUserRepository.findAll(admin);
//        for (SysUser sysUser : all) {
//            MatcherAssert.assertThat(sysUser.getUsername() , Is.is("admin"));
//        }
//    }
//
//}
